<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::Source::Rubygems - bundler: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Source.html">Bundler::Source</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-from_lock">::from_lock</a>
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-3D-3D">#==</a>
    <li ><a href="#method-i-add_remote">#add_remote</a>
    <li ><a href="#method-i-api_fetchers">#api_fetchers</a>
    <li ><a href="#method-i-cache">#cache</a>
    <li ><a href="#method-i-cache_path">#cache_path</a>
    <li ><a href="#method-i-cached-21">#cached!</a>
    <li ><a href="#method-i-cached_built_in_gem">#cached_built_in_gem</a>
    <li ><a href="#method-i-cached_gem">#cached_gem</a>
    <li ><a href="#method-i-cached_path">#cached_path</a>
    <li ><a href="#method-i-cached_specs">#cached_specs</a>
    <li ><a href="#method-i-caches">#caches</a>
    <li class="calls-super" ><a href="#method-i-can_lock-3F">#can_lock?</a>
    <li ><a href="#method-i-credless_remotes">#credless_remotes</a>
    <li ><a href="#method-i-default_cache_path_for">#default_cache_path_for</a>
    <li ><a href="#method-i-dependency_api_available-3F">#dependency_api_available?</a>
    <li ><a href="#method-i-dependency_names_to_double_check">#dependency_names_to_double_check</a>
    <li ><a href="#method-i-double_check_for">#double_check_for</a>
    <li ><a href="#method-i-download_cache_path">#download_cache_path</a>
    <li ><a href="#method-i-download_gem">#download_gem</a>
    <li ><a href="#method-i-eql-3F">#eql?</a>
    <li ><a href="#method-i-extension_cache_slug">#extension_cache_slug</a>
    <li ><a href="#method-i-fetch_gem">#fetch_gem</a>
    <li ><a href="#method-i-fetch_gem_if_possible">#fetch_gem_if_possible</a>
    <li ><a href="#method-i-fetch_names">#fetch_names</a>
    <li ><a href="#method-i-fetchers">#fetchers</a>
    <li ><a href="#method-i-hash">#hash</a>
    <li ><a href="#method-i-identifier">#identifier</a>
    <li ><a href="#method-i-include-3F">#include?</a>
    <li ><a href="#method-i-install">#install</a>
    <li ><a href="#method-i-installed-3F">#installed?</a>
    <li ><a href="#method-i-installed_specs">#installed_specs</a>
    <li ><a href="#method-i-local-21">#local!</a>
    <li ><a href="#method-i-local_only-21">#local_only!</a>
    <li ><a href="#method-i-multiple_remotes-3F">#multiple_remotes?</a>
    <li ><a href="#method-i-name">#name</a>
    <li ><a href="#method-i-no_remotes-3F">#no_remotes?</a>
    <li ><a href="#method-i-normalize_uri">#normalize_uri</a>
    <li ><a href="#method-i-options">#options</a>
    <li ><a href="#method-i-package_path">#package_path</a>
    <li ><a href="#method-i-remote-21">#remote!</a>
    <li ><a href="#method-i-remote_names">#remote_names</a>
    <li ><a href="#method-i-remote_specs">#remote_specs</a>
    <li ><a href="#method-i-remotes_for_spec">#remotes_for_spec</a>
    <li ><a href="#method-i-remove_auth">#remove_auth</a>
    <li ><a href="#method-i-rubygems_dir">#rubygems_dir</a>
    <li ><a href="#method-i-spec_names">#spec_names</a>
    <li ><a href="#method-i-specs">#specs</a>
    <li ><a href="#method-i-suppress_configured_credentials">#suppress_configured_credentials</a>
    <li ><a href="#method-i-to_gemfile">#to_gemfile</a>
    <li ><a href="#method-i-to_lock">#to_lock</a>
    <li ><a href="#method-i-to_s">#to_s</a>
    <li ><a href="#method-i-unmet_deps">#unmet_deps</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::Source::Rubygems">
    <h1 id="class-Bundler::Source::Rubygems" class="class">
      class Bundler::Source::Rubygems
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">


      <section class="constants-list">
      <header>
      <h3>Constants</h3>
      </header>
      <dl>
          <dt id="API_REQUEST_SIZE">API_REQUEST_SIZE
          <dd><p>Ask for X gems per API request</p>
        </dl>
        </section>

        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-remotes" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">remotes</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-from_lock" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">from_lock</span><span
                                class="method-args">(options)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="from_lock-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 90</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">from_lock</span>(<span class="ruby-identifier">options</span>)
  <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;remotes&quot;</span>] = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-string">&quot;remote&quot;</span>)).<span class="ruby-identifier">reverse</span>
  <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(options = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 15</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span> = {})
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
  <span class="ruby-ivar">@remotes</span> = []
  <span class="ruby-ivar">@dependency_names</span> = []
  <span class="ruby-ivar">@allow_remote</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@allow_cached</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@allow_local</span> = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;allow_local&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">false</span>

  <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;remotes&quot;</span>]).<span class="ruby-identifier">reverse_each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">add_remote</span>(<span class="ruby-identifier">r</span>) }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-3D-3D" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">==</span><span
                                class="method-args">(other)</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="Rubygems.html#method-i-eql-3F">eql?</a>
                            </div>
                          </div>

                  <div id="method-i-add_remote" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_remote</span><span
                                class="method-args">(source)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_remote-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 235</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_remote</span>(<span class="ruby-identifier">source</span>)
  <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">normalize_uri</span>(<span class="ruby-identifier">source</span>)
  <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">uri</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cache" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cache</span><span
                                class="method-args">(spec, custom_path = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cache-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 211</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">custom_path</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">cached_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:cache_all_platforms</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">fetch_gem_if_possible</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">cached_gem</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-node">&quot;Missing gem file &#39;#{spec.file_name}&#39;.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">cached_path</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">cached_path</span>) <span class="ruby-operator">==</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;  * #{File.basename(cached_path)}&quot;</span>
  <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">cp</span>(<span class="ruby-identifier">cached_path</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>(<span class="ruby-identifier">custom_path</span>))
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">e</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">InstallError</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached-21-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 51</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached!</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@allow_cached</span>

  <span class="ruby-ivar">@specs</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@allow_local</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-ivar">@allow_cached</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached_built_in_gem" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached_built_in_gem</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached_built_in_gem-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 222</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached_built_in_gem</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">cached_path</span> = <span class="ruby-identifier">cached_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">cached_path</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">remote_spec</span> = <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">spec</span>).<span class="ruby-identifier">first</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">remote_spec</span>
      <span class="ruby-identifier">cached_path</span> = <span class="ruby-identifier">fetch_gem</span>(<span class="ruby-identifier">remote_spec</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;#{spec.full_name} is built in to Ruby, and can&#39;t be cached because your Gemfile doesn&#39;t have any sources that contain it.&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">cached_path</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-caches" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">caches</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="caches-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">caches</span>
  <span class="ruby-ivar">@caches</span> <span class="ruby-operator">||=</span> [<span class="ruby-identifier">cache_path</span>, <span class="ruby-operator">*</span><span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_cache</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-can_lock-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">can_lock?</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="../Source.html#method-i-can_lock-3F"><code>Bundler::Source#can_lock?</code></a>
                              </div>

                              <div class="method-source-code" id="can_lock-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 81</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">can_lock?</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">super</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">multiple_remotes?</span>
  <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependency_api_available-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependency_api_available?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="dependency_api_available-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 298</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependency_api_available?</span>
  <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">api_fetchers</span>.<span class="ruby-identifier">any?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependency_names_to_double_check" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependency_names_to_double_check</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="dependency_names_to_double_check-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 283</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependency_names_to_double_check</span>
  <span class="ruby-identifier">names</span> = []
  <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">spec</span>
    <span class="ruby-keyword">when</span> <span class="ruby-constant">EndpointSpecification</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>, <span class="ruby-constant">StubSpecification</span>, <span class="ruby-constant">LazySpecification</span>
      <span class="ruby-identifier">names</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">runtime_dependencies</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:name</span>))
    <span class="ruby-keyword">when</span> <span class="ruby-constant">RemoteSpecification</span> <span class="ruby-comment"># from the full index</span>
      <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unhandled spec type (#{spec.inspect})&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">names</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-double_check_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">double_check_for</span><span
                                class="method-args">(unmet_dependency_names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="double_check_for-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 263</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">double_check_for</span>(<span class="ruby-identifier">unmet_dependency_names</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">dependency_api_available?</span>

  <span class="ruby-identifier">unmet_dependency_names</span> = <span class="ruby-identifier">unmet_dependency_names</span>.<span class="ruby-identifier">call</span>
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">unmet_dependency_names</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">api_fetchers</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">1</span>
      <span class="ruby-comment"># can&#39;t do this when there are multiple fetchers because then we might not fetch from _all_</span>
      <span class="ruby-comment"># of them</span>
      <span class="ruby-identifier">unmet_dependency_names</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">spec_names</span> <span class="ruby-comment"># avoid re-fetching things we&#39;ve already gotten</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">unmet_dependency_names</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Double checking for #{unmet_dependency_names || &quot;all specs (due to the size of the request)&quot;} in #{self}&quot;</span>

  <span class="ruby-identifier">fetch_names</span>(<span class="ruby-identifier">api_fetchers</span>, <span class="ruby-identifier">unmet_dependency_names</span>, <span class="ruby-identifier">remote_specs</span>)

  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">use</span> <span class="ruby-identifier">remote_specs</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-eql-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">eql?</span><span
                                class="method-args">(other)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="eql-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">eql?</span>(<span class="ruby-identifier">other</span>)
  <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rubygems</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">credless_remotes</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">credless_remotes</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="Rubygems.html#method-i-3D-3D">==</a>
                            </div>

                          </div>

                  <div id="method-i-fetchers" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">fetchers</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="fetchers-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 256</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fetchers</span>
  <span class="ruby-ivar">@fetchers</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">remote</span> = <span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>)
    <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Fetcher</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">remote</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-hash" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">hash</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="hash-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 59</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash</span>
  <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">hash</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-identifier" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">identifier</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="identifier-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 119</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">identifier</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-string">&quot;locally installed gems&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-node">&quot;rubygems repository #{remote_names}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="Rubygems.html#method-i-name">name</a>, <a href="Rubygems.html#method-i-to_gemfile">to_gemfile</a>
                            </div>

                          </div>

                  <div id="method-i-include-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">include?</span><span
                                class="method-args">(o)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="include-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">include?</span>(<span class="ruby-identifier">o</span>)
  <span class="ruby-identifier">o</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Rubygems</span>) <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">o</span>.<span class="ruby-identifier">credless_remotes</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">credless_remotes</span>).<span class="ruby-identifier">empty?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-install" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install</span><span
                                class="method-args">(spec, options = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 141</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">options</span> = {})
  <span class="ruby-identifier">force</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:force</span>]
  <span class="ruby-identifier">ensure_builtin_gems_cached</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:ensure_builtin_gems_cached</span>]

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">ensure_builtin_gems_cached</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">default_gem?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">cached_path</span>(<span class="ruby-identifier">spec</span>)
    <span class="ruby-identifier">cached_built_in_gem</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
    <span class="ruby-identifier">force</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">installed?</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">force</span>
    <span class="ruby-identifier">print_using_message</span> <span class="ruby-node">&quot;Using #{version_message(spec, options[:previous_spec])}&quot;</span>
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-comment"># no post-install message</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
    <span class="ruby-comment"># Check for this spec from other sources</span>
    <span class="ruby-identifier">uris</span> = [<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">remotes_for_spec</span>(<span class="ruby-identifier">spec</span>)].<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:anonymized_uri</span>).<span class="ruby-identifier">uniq</span>
    <span class="ruby-constant">Installer</span>.<span class="ruby-identifier">ambiguous_gems</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">uris</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">uris</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">path</span> = <span class="ruby-identifier">fetch_gem_if_possible</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:previous_spec</span>])
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-node">&quot;Could not find #{spec.file_name} for installation&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">path</span>

  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:no_install</span>]

  <span class="ruby-identifier">install_path</span> = <span class="ruby-identifier">rubygems_dir</span>
  <span class="ruby-identifier">bin_path</span>     = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">system_bindir</span>

  <span class="ruby-identifier">require_relative</span> <span class="ruby-string">&quot;../rubygems_gem_installer&quot;</span>

  <span class="ruby-identifier">installer</span> = <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">RubyGemsGemInstaller</span>.<span class="ruby-identifier">at</span>(
    <span class="ruby-identifier">path</span>,
    <span class="ruby-value">:security_policy</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">security_policies</span>[<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-string">&quot;trust-policy&quot;</span>]],
    <span class="ruby-value">:install_dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">install_path</span>.<span class="ruby-identifier">to_s</span>,
    <span class="ruby-value">:bin_dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">bin_path</span>.<span class="ruby-identifier">to_s</span>,
    <span class="ruby-value">:ignore_dependencies</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>,
    <span class="ruby-value">:wrappers</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>,
    <span class="ruby-value">:env_shebang</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>,
    <span class="ruby-value">:build_args</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:build_args</span>],
    <span class="ruby-value">:bundler_expected_checksum</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:checksum</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">checksum</span>,
    <span class="ruby-value">:bundler_extension_cache_path</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">extension_cache_path</span>(<span class="ruby-identifier">spec</span>)
  )

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
    <span class="ruby-identifier">s</span> = <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">installer</span>.<span class="ruby-identifier">spec</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Package</span><span class="ruby-operator">::</span><span class="ruby-constant">FormatError</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
      <span class="ruby-identifier">raise</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Security</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>,
       <span class="ruby-node">&quot;The gem #{File.basename(path, &quot;.gem&quot;)} can&#39;t be installed because &quot;</span> \
       <span class="ruby-node">&quot;the security policy didn&#39;t allow it, with the message: #{e.message}&quot;</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">__swap__</span>(<span class="ruby-identifier">s</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;Installing #{version_message(spec, options[:previous_spec])}&quot;</span>
  <span class="ruby-identifier">message</span> <span class="ruby-operator">+=</span> <span class="ruby-string">&quot; with native extensions&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">extensions</span>.<span class="ruby-identifier">any?</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-identifier">message</span>

  <span class="ruby-identifier">installed_spec</span> = <span class="ruby-identifier">installer</span>.<span class="ruby-identifier">install</span>

  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span> = <span class="ruby-identifier">installed_spec</span>.<span class="ruby-identifier">full_gem_path</span>
  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">loaded_from</span> = <span class="ruby-identifier">installed_spec</span>.<span class="ruby-identifier">loaded_from</span>

  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">post_install_message</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local-21-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local!</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@allow_local</span>

  <span class="ruby-ivar">@specs</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@allow_local</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local_only-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local_only!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local_only-21-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 30</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local_only!</span>
  <span class="ruby-ivar">@specs</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@allow_local</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-ivar">@allow_cached</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@allow_remote</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-multiple_remotes-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">multiple_remotes?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="multiple_remotes-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">multiple_remotes?</span>
  <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">name</span><span
                                class="method-args">()</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="Rubygems.html#method-i-identifier">identifier</a>
                            </div>
                          </div>

                  <div id="method-i-no_remotes-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">no_remotes?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="no_remotes-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">no_remotes?</span>
  <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-options" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">options</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="options-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 86</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">options</span>
  { <span class="ruby-string">&quot;remotes&quot;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-ivar">@remotes</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:to_s</span>) }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remote-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remote!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remote-21-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remote!</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@allow_remote</span>

  <span class="ruby-ivar">@specs</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@allow_remote</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-spec_names" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">spec_names</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="spec_names-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 240</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">spec_names</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency_api_available?</span>
    <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">spec_names</span>
  <span class="ruby-keyword">else</span>
    []
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-specs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">specs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="specs-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 129</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">specs</span>
  <span class="ruby-ivar">@specs</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-comment"># remote_specs usually generates a way larger Index than the other</span>
    <span class="ruby-comment"># sources, and large_idx.merge! small_idx is way faster than</span>
    <span class="ruby-comment"># small_idx.merge! large_idx.</span>
    <span class="ruby-identifier">index</span> = <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">dup</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Index</span>.<span class="ruby-identifier">new</span>
    <span class="ruby-identifier">index</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">cached_specs</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@allow_cached</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@allow_remote</span>
    <span class="ruby-identifier">index</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">installed_specs</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@allow_local</span>
    <span class="ruby-identifier">index</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_gemfile" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">to_gemfile</span><span
                                class="method-args">()</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="Rubygems.html#method-i-identifier">identifier</a>
                            </div>
                          </div>

                  <div id="method-i-to_lock" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_lock</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_lock-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 95</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_lock</span>
  <span class="ruby-identifier">out</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;GEM\n&quot;</span>)
  <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">remote</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;  remote: #{suppress_configured_credentials remote}\n&quot;</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;  specs:\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_s" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_s</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_s-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 103</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-string">&quot;locally installed gems&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@allow_cached</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@allow_local</span>
    <span class="ruby-node">&quot;rubygems repository #{remote_names}, cached gems or installed locally&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@allow_local</span>
    <span class="ruby-node">&quot;rubygems repository #{remote_names} or installed locally&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@allow_remote</span>
    <span class="ruby-node">&quot;rubygems repository #{remote_names}&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@allow_cached</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@allow_local</span>
    <span class="ruby-string">&quot;cached gems or installed locally&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-string">&quot;locally installed gems&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-unmet_deps" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">unmet_deps</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="unmet_deps-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 248</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">unmet_deps</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency_api_available?</span>
    <span class="ruby-identifier">remote_specs</span>.<span class="ruby-identifier">unmet_dependency_names</span>
  <span class="ruby-keyword">else</span>
    []
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="protected-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Protected Instance Methods</h3>
                </header>

                  <div id="method-i-api_fetchers" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">api_fetchers</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="api_fetchers-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 396</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">api_fetchers</span>
  <span class="ruby-identifier">fetchers</span>.<span class="ruby-identifier">select</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:api_fetcher?</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cache_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cache_path</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cache_path-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 460</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cache_path</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached_gem" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached_gem</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached_gem-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 323</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached_gem</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">default_gem?</span>
    <span class="ruby-identifier">cached_built_in_gem</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">cached_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached_path</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached_path-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 331</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">global_cache_path</span> = <span class="ruby-identifier">download_cache_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">caches</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">global_cache_path</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">global_cache_path</span>

  <span class="ruby-identifier">possibilities</span> = <span class="ruby-identifier">caches</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">package_path</span>(<span class="ruby-identifier">p</span>, <span class="ruby-identifier">spec</span>) }
  <span class="ruby-identifier">possibilities</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">p</span>) }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cached_specs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cached_specs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cached_specs-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 382</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cached_specs</span>
  <span class="ruby-ivar">@cached_specs</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">idx</span> = <span class="ruby-constant">Index</span>.<span class="ruby-identifier">new</span>

    <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{cache_path}/*.gem&quot;</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gemfile</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">s</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">spec_from_gem</span>(<span class="ruby-identifier">gemfile</span>)
      <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> = <span class="ruby-keyword">self</span>
      <span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">s</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">idx</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-credless_remotes" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">credless_remotes</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="credless_remotes-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 308</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">credless_remotes</span>
  <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:allow_deployment_source_credential_changes</span>]
    <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:remove_auth</span>))
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:suppress_configured_credentials</span>))
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-default_cache_path_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">default_cache_path_for</span><span
                                class="method-args">(dir)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="default_cache_path_for-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 456</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">default_cache_path_for</span>(<span class="ruby-identifier">dir</span>)
  <span class="ruby-node">&quot;#{dir}/cache&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-fetch_gem" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">fetch_gem</span><span
                                class="method-args">(spec, previous_spec = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="fetch_gem-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 433</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fetch_gem</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">previous_spec</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">fetch_platform</span>

  <span class="ruby-identifier">cache_path</span> = <span class="ruby-identifier">download_cache_path</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">default_cache_path_for</span>(<span class="ruby-identifier">rubygems_dir</span>)
  <span class="ruby-identifier">gem_path</span> = <span class="ruby-identifier">package_path</span>(<span class="ruby-identifier">cache_path</span>, <span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">gem_path</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">gem_path</span>)

  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">p</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">download_gem</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">cache_path</span>, <span class="ruby-identifier">previous_spec</span>)

  <span class="ruby-identifier">gem_path</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-fetch_gem_if_possible" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">fetch_gem_if_possible</span><span
                                class="method-args">(spec, previous_spec = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="fetch_gem_if_possible-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 425</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fetch_gem_if_possible</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">previous_spec</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
    <span class="ruby-identifier">fetch_gem</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">previous_spec</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">cached_gem</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-fetch_names" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">fetch_names</span><span
                                class="method-args">(fetchers, dependency_names, index)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="fetch_names-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 412</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fetch_names</span>(<span class="ruby-identifier">fetchers</span>, <span class="ruby-identifier">dependency_names</span>, <span class="ruby-identifier">index</span>)
  <span class="ruby-identifier">fetchers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency_names</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Fetching gem metadata from #{URICredentialsFilter.credential_filtered_uri(f.uri)}&quot;</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug?</span>
      <span class="ruby-identifier">index</span>.<span class="ruby-identifier">use</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">specs_with_retry</span>(<span class="ruby-identifier">dependency_names</span>, <span class="ruby-keyword">self</span>)
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug?</span> <span class="ruby-comment"># new line now that the dots are over</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Fetching source index from #{URICredentialsFilter.credential_filtered_uri(f.uri)}&quot;</span>
      <span class="ruby-identifier">index</span>.<span class="ruby-identifier">use</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">specs_with_retry</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-keyword">self</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-installed-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">installed?</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="installed-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 448</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">installed?</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">installed_specs</span>[<span class="ruby-identifier">spec</span>].<span class="ruby-identifier">any?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">deleted_gem?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-installed_specs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">installed_specs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="installed_specs-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 369</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">installed_specs</span>
  <span class="ruby-ivar">@installed_specs</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Index</span>.<span class="ruby-identifier">build</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">all_specs</span>.<span class="ruby-identifier">reverse_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span> = <span class="ruby-keyword">self</span>
      <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">spec_missing_extensions?</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-keyword">false</span>)
        <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Source #{self} is ignoring #{spec} because it is missing extensions&quot;</span>
        <span class="ruby-keyword">next</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-normalize_uri" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">normalize_uri</span><span
                                class="method-args">(uri)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="normalize_uri-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 343</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">normalize_uri</span>(<span class="ruby-identifier">uri</span>)
  <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URINormalizer</span>.<span class="ruby-identifier">normalize_suffix</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>)
  <span class="ruby-identifier">require_relative</span> <span class="ruby-string">&quot;../vendored_uri&quot;</span>
  <span class="ruby-identifier">uri</span> = <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">URI</span>(<span class="ruby-identifier">uri</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;The source must be an absolute URI. For example:\n&quot;</span> \
    <span class="ruby-string">&quot;source &#39;https://rubygems.org&#39;&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">uri</span>.<span class="ruby-identifier">absolute?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">URI</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>.<span class="ruby-identifier">nil?</span>)
  <span class="ruby-identifier">uri</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-package_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">package_path</span><span
                                class="method-args">(cache_path, spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="package_path-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 339</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">package_path</span>(<span class="ruby-identifier">cache_path</span>, <span class="ruby-identifier">spec</span>)
  <span class="ruby-node">&quot;#{cache_path}/#{spec.file_name}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remote_names" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remote_names</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remote_names-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 304</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remote_names</span>
  <span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:to_s</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;, &quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remote_specs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remote_specs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remote_specs-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 400</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remote_specs</span>
  <span class="ruby-ivar">@remote_specs</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Index</span>.<span class="ruby-identifier">build</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">index_fetchers</span> = <span class="ruby-identifier">fetchers</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">api_fetchers</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">index_fetchers</span>.<span class="ruby-identifier">empty?</span>
      <span class="ruby-identifier">fetch_names</span>(<span class="ruby-identifier">api_fetchers</span>, <span class="ruby-identifier">dependency_names</span>, <span class="ruby-identifier">idx</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">fetch_names</span>(<span class="ruby-identifier">fetchers</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">idx</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remotes_for_spec" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remotes_for_spec</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remotes_for_spec-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 316</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remotes_for_spec</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">search_all</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">inject</span>([]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">uris</span>, <span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">uris</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">remote</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">remote</span>
    <span class="ruby-identifier">uris</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remove_auth" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_auth</span><span
                                class="method-args">(remote)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="remove_auth-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 361</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_auth</span>(<span class="ruby-identifier">remote</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">user</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">password</span>
    <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">tap</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">password</span> = <span class="ruby-keyword">nil</span> }.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-rubygems_dir" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">rubygems_dir</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="rubygems_dir-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 452</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">rubygems_dir</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bundle_path</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-suppress_configured_credentials" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">suppress_configured_credentials</span><span
                                class="method-args">(remote)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="suppress_configured_credentials-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 352</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">suppress_configured_credentials</span>(<span class="ruby-identifier">remote</span>)
  <span class="ruby-identifier">remote_nouser</span> = <span class="ruby-identifier">remove_auth</span>(<span class="ruby-identifier">remote</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">userinfo</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">userinfo</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-identifier">remote_nouser</span>]
    <span class="ruby-identifier">remote_nouser</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">remote</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-download_cache_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">download_cache_path</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the global cache path of the calling Rubygems::Source object.</p>

<p>Note that the <a href="../Source.html"><code>Source</code></a> determines the path’s subdirectory. We use this subdirectory in the global cache path so that gems with the same name – and possibly different versions – from different sources are saved to their respective subdirectories and do not override one another.</p>

<p>@param  [Gem::Specification] specification</p>

<p>@return [Pathname] The global cache path.</p>

                              <div class="method-source-code" id="download_cache_path-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 495</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">download_cache_path</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">feature_flag</span>.<span class="ruby-identifier">global_gem_cache?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">remote</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">cache_slug</span> = <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">cache_slug</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_cache</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;gems&quot;</span>, <span class="ruby-identifier">cache_slug</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-download_gem" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">download_gem</span><span
                                class="method-args">(spec, download_cache_path, previous_spec = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Checks if the requested spec exists in the global cache. If it does, we copy it to the download path, and if it does not, we download it.</p>

<p>@param  [Specification] spec</p>

<pre>the spec we want to download or retrieve from the cache.</pre>

<p>@param  [String] <a href="Rubygems.html#method-i-download_cache_path"><code>download_cache_path</code></a></p>

<pre>the local directory the .gem will end up in.</pre>

<p>@param  [Specification] previous_spec</p>

<pre class="ruby"><span class="ruby-identifier">the</span> <span class="ruby-identifier">spec</span> <span class="ruby-identifier">previously</span> <span class="ruby-identifier">locked</span>
</pre>

                              <div class="method-source-code" id="download_gem-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 478</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">download_gem</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">download_cache_path</span>, <span class="ruby-identifier">previous_spec</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>.<span class="ruby-identifier">uri</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span>(<span class="ruby-node">&quot;Fetching #{version_message(spec, previous_spec)}&quot;</span>)
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">download_gem</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">download_cache_path</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extension_cache_slug" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extension_cache_slug</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extension_cache_slug-source">
            <pre><span class="ruby-comment"># File bundler/source/rubygems.rb, line 503</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extension_cache_slug</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">remote</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">remote</span>
  <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">cache_slug</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

